<template>
    <view>
        <image class="top-bg" src="/static/images/top-bg.png"></image>
        <view class="header">
            <view class="logo-title">
                <image class="logo" src="/static/images/logo.png"></image>
                <text class="title">鼎锋云</text>
                <view class="page-title">{{ pageTitle }}</view>
            </view>
        </view>
    </view>
</template>

<script>
export default {
    name: "Header",
    props: {
        pageTitle: {
            type: String,
            default: "首页"
        }
    }
};
</script>

<style scoped lang="scss">
.top-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 750rpx;
    pointer-events: none;
}

.header {
    display: flex;
    flex-direction: column;
    padding: 100rpx 32rpx 50rpx;

    .logo-title {
        position: relative;
        display: flex;
        align-items: flex-start;

        .logo {
            width: 72rpx;
            height: 72rpx;
            margin-right: 10rpx;
        }

        .title {
            font-family: OPPOSans, OPPOSans;
            font-weight: bold;
            font-size: 36rpx;
            color: #2d6040;
            line-height: 72rpx;
        }
    }

    .page-title {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-family: PingFang SC, PingFang SC;
        font-weight: 500;
        font-size: 36rpx;
        color: #000000;
    }
}
</style>